package com.itheima.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select t1.role_desc " +
            "from ss_role t1,ss_role_user t2,ss_user t3 " +
            "where t1.role_id" +
            "=t2.role_id and t2.user_id=t3.user_id " +
            "and t3.user_name=#{username}")
    public List<String> selectRoles(@Param("username") String username);
}